package com.ssyx.sys.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ssyx.model.sys.Region;

import com.ssyx.sys.mapper.RegionMapper;
import com.ssyx.sys.service.RegionService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * ClassName:RegionServiceImpl
 * Description:
 *
 * @Author kay
 * @Create 2024/4/26 16:30
 * @Version 1.0
 */
@Service
public class RegionServiceImpl extends ServiceImpl<RegionMapper, Region>
        implements RegionService {

    //根据关键字获取地区列表
    @Override
    public List<Region> findRegionByKeyword(String keyword) {
        LambdaQueryWrapper<Region> wrapper = new LambdaQueryWrapper<>();
        wrapper.like(Region::getName,keyword);
        List<Region> regionList = baseMapper.selectList(wrapper);
        return regionList;
    }
}
